package com.ruoyi.system.domain.vo;

import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;

@EqualsAndHashCode(callSuper = true)
@Data
public class FmsMainVo extends BaseEntity {
    /** 编号，自动递增 */
    @Excel(name = "序号")
    private Long id;
    /** 类型编号 */

    private Long typeId;

    /** 类型名称 */
    @Excel(name = "名称")
    private String typeName;

    /** 消费金额 */
    @Excel(name = "金额")
    @NotNull(message = "金额不能为空")
    @DecimalMin(value = "0.00", message = "金额不能小于0.00", inclusive = false)
    private BigDecimal mainMoney;
    /** 金额类型，0收入，1支出  */
    private Integer moneyType;

    private String moneyTypeValue;
    @Excel(name = "类型")
    private String moneyTypeValueStr;
    // 总数量
    private Integer totalCount;
    /**
     * 说明
     */
    @Excel(name = "说明")
    private String remark;
    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("typeId", getTypeId())
                .append("moneyType", getMoneyType())
                .append("mainMoney", getMainMoney())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .append("remark", getRemark())
                .toString();
    }
}
